'use strict';
function bottles(t){
    let result="";
    if(t>2)
    {
        for(let i=t;i>2;i--)
            {
                result+=`${i} bottles of beer on the wall, ${i} bottles of beer.\n`;
                result+=`Take one down and pass it around, ${i-1} bottles of beer on the wall.\n`
            }
        result+='2 bottles of beer on the wall, 2 bottles of beer.\n';
        result+='Take one down and pass it around, 1 bottle of beer on the wall.\n';
        result+='1 bottle of beer on the wall, 1 bottle of beer.\n';
        result+='Take one down and pass it around, no more bottles of beer on the wall.\n';
        result+= 'No more bottles of beer on the wall, no more bottles of beer.\n';
        result+=`Go to the store and buy some more, ${t} bottles of beer on the wall.`;
    }
    if(t==2)
        {
            result+='2 bottles of beer on the wall, 2 bottles of beer.\n';
            result+='Take one down and pass it around, 1 bottle of beer on the wall.\n';
            result+='1 bottle of beer on the wall, 1 bottle of beer.\n';
            result+='Take one down and pass it around, no more bottles of beer on the wall.\n';
            result+= 'No more bottles of beer on the wall, no more bottles of beer.\n';
            result+=`Go to the store and buy some more, ${t} bottles of beer on the wall.`;
        }
    if(t==1)
        {
            result+='1 bottle of beer on the wall, 1 bottle of beer.\n';
            result+='Take one down and pass it around, no more bottles of beer on the wall.\n';
            result+= 'No more bottles of beer on the wall, no more bottles of beer.\n';
            result+=`Go to the store and buy some more, ${t} bottle of beer on the wall.`;

        }
    return result;
}
module.exports=bottles;
